﻿<Page
    x:Class="WebSocketExamples.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WebSocketExamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0">
            <TextBlock Text="Enter Message:" Style="{StaticResource BaseTextBlockStyle}"/>
            <TextBox x:Name="Text" VerticalAlignment="Top" Width="400" Margin="10 0 0 0"/>
            <Button Content="SEND" VerticalAlignment="Top" Click="ButtonBase_OnClick" Margin="10 0 0 0"/>            
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="1">
            <TextBlock Text="Status:" Style="{StaticResource BaseTextBlockStyle}"/>
            <TextBlock x:Name="Status" Style="{StaticResource BaseTextBlockStyle}" FontWeight="Bold" Margin="10 0 0 0"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="2">
            <TextBlock Text="Response:" Style="{StaticResource BaseTextBlockStyle}"/>
            <TextBlock x:Name="Response" Style="{StaticResource BaseTextBlockStyle}" FontWeight="Bold" Margin="10 0 0 0"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="3" Margin="0 20 0 0">
            <TextBlock Text="Continuous Stream:" Style="{StaticResource BaseTextBlockStyle}"/>
            <Button Content="Start" Click="Start_OnClick" x:Name="Start" Margin="10 0 0 0"/>
            <Button Content="Stop" Click="End_OnClick" x:Name="End" IsEnabled="False"/>
        </StackPanel>
        <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="Primes" Grid.Row="4" Style="{StaticResource BaseTextBlockStyle}" TextWrapping="Wrap"/>
    </Grid>
</Page>
